<table class="table table-bordered table-striped my-3">
    <tbody>
    <tr>
        <th colspan="2" style="color: #007bff;">{{ ts('VALIDWARRANTYID') }}</th>
    </tr>
    <tr>
        <td>{{ ts('WARRANTYID') }}</td>
        <td>{{ @$model->warranty_id }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('CUSTOMERNAME') }}</td>
        <td class="ttd">{{ @$model->first_name }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('phonenumber') }}</td>
        <td class="ttd">{{ @$model->extension }} {{ @$model->phone_number }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('email') }}</td>
        <td class="ttd">{{ $model->email_address }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('region') }}</td>
        <td>{{ ts('region_master.'.@$model->region_id) }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('province') }}</td>
        <td>{{ ts('province_master.'.@$model->province_id) }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('city') }}</td>
        <td>{{ ts('cities.'.@$model->city) }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('addresss') }}</td>
        <td>{{ $model->address }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('zip') }}</td>
        <td>{{ @$model->zip }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('year') }}</td>
        <td>{{ @$model->year_id }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('make') }}</td>
        <td>{{ ts('make_master.'.@$model->make_id) }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('model') }}</td>
        <td>
            {{ ts('model_master.'.@$model->model_id) ?: $model->model_id }}
        </td>
    </tr>

    <tr>
        <td class="tth">{{ ts('licenseplate') }}</td>
        <td>{{ @$model->license_plate }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('vinnumber') }}</td>
        <td>{{ @$model->vin_number }}</td>
    </tr>

    @php
        $mRoll = gMR($model->id);
        $wPart = gWFP($model->id);
    @endphp
    @if(@$mRoll)
        <tr>
            <td class="tth">{{ ts('rollnumber') }}</td>
            <td class="ttd">{{ @$mRoll }}</td>
        </tr>
    @endif

    @foreach(@$wPart as $c)
        <tr>
            <td class="tth">{{ ts('ZTBW') }}</td>
            <td>{{ @$c->part }}</td>
        </tr>
        <tr>
            <td class="tth">{{ ts('filmtype') }}</td>
            <td>{{ @$c->film_type }}</td>
        </tr>
        <tr>
            <td class="tth">质保时间</td>
            @if(empty(@$c->start_time))
                <td></td>
            @elseif ((@$c->end_time - @$c->start_time) >= 20* 365 * 24 * 60 * 60)
                <td>终身质保</td>
            @else
                <td>{{date("Y-m-d H:i:s",@$c->start_time)}} - {{date("Y-m-d H:i:s",@$c->end_time)}}</td>
            @endif
        </tr>
    @endforeach

    <tr>
        <td class="tth">{{ ts('DMMC') }}</td>
        <td>{{ getWDName($model) }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('INSTALLERNAME') }}</td>
        <td>{{ $model->installer_name }}</td>
    </tr>

    <tr>
        <td class="tth">{{ ts('INSTALLATIONDATE') }}</td>
        <td>
            {{ fdate(@$model->installation_date) }}
        </td>
    </tr>

    <!--<tr>
                                            <td class="tth">{{ ts('INSTALLERPRICE') }}</td>
                                            <td>{{ $model->installation_price }}</td>
                                        </tr>-->
    </tbody>
</table>